A 3D model is also referred to as a three-dimensional model or a stereoscopic model and includes models of various buildings, characters, vegetation, machinery, and the like. A 3D model can be interacted and presented stereoscopically in a web page to produce a stronger visual effect for a viewer.
Coloration of a 3D model is performing shade processing on the 3D model, so as to generate a vivid image, and rendering is based on the coloration and shows bright and dark colors and an illumination effect on a surface of the 3D model, so as to form a more vivid image. An effect of an image obtained by means of rendering is of more reality sense and material sense. At present, when rendering is performed on a 3D model, a Blinn-Phong illumination model is usually used, and this illumination model is based on a conventional Phong illumination model and a modification, and as compared with the conventional Phong illumination model, has a softer and smoother rendering effect.
The inventor of the present application finds by means of researches that: an existing 3D model rendering manner by using a Blinn-Phong illumination model is mainly calculating coloration of each vertex on a surface of a 3D model, so as to color each vertex on the 3D model. However, coloring each point on the 3D model would cause a very huge calculation amount and has a very high requirement on performance of an electronic device in a process of performing 3D model rendering.